# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=repod
pkgver=0.2.2
pkgrel=2
pkgdesc="Tooling to maintain binary package repositories"
arch=(any)
url="https://repod.archlinux.page/"
license=(GPL3)
depends=(
  pyalpm
  python-aiofiles
  python-email-validator
  python-jinja
  python-magic
  python-orjson
  python-pydantic
  python-pyxdg
  python-pyzstd
  python-subprocess-tee
  python-tomli
)
makedepends=(
  just
  python-build
  python-installer
  python-poetry-core
  python-setuptools
  python-sphinx
  python-sphinx-argparse
  python-sphinxcontrib-programoutput
  python-wheel
)
checkdepends=(python-pytest python-pytest-asyncio python-pytest-lazy-fixture)
source=(
  https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz
)
sha256sums=('0d30e17f27402044aaa875b476b81c85f400cf634c543d34bb61d20bf47bc84d')
b2sums=('e4bee6a48b905e5d58353ec2ce47d01216c35f1c6195d2fae8822a56c6cd49d6b4ae80a0054d9b83679036ffa066573bae114dc24e71177fb2da334cd474f7f7')

build() {
  cd $pkgname-$pkgver
  just build
}

check() {
  cd $pkgname-$pkgver
  just check
}

package() {
  cd $pkgname-$pkgver
  just --set destdir "$pkgdir" install
}
